﻿<navigation:PageView x:Class="Corina.Cydee.Apphub.Views.Sysmgr.RoleView"
                     xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                     xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                     xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
                     xmlns:localViewmodel="clr-namespace:Corina.Cydee.Apphub.Viewmodels"
                     xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
                     xmlns:navigation="clr-namespace:Corina.Cydee.Apphub.Base"
                     Title="角色管理"
                     d:DesignHeight="480"
                     d:DesignWidth="640"
                     mc:Ignorable="d">
    <navigation:PageView.DataContext>
        <localViewmodel:RoleViewmodel />
    </navigation:PageView.DataContext>
    <Grid x:Name="LayoutRoot">
        <Grid.ColumnDefinitions>
            <ColumnDefinition />
            <ColumnDefinition Width="300" />
        </Grid.ColumnDefinitions>
        <ListBox ItemContainerStyle="{StaticResource RoleListitemStyle}" ItemsSource="{Binding ItemsCollection}" />

        <Grid Grid.Column="1" Margin="12,0,0,0">
            <Grid.RowDefinitions>
                <RowDefinition />
                <RowDefinition Height="Auto" />
            </Grid.RowDefinitions>
            <StackPanel>
                <TextBlock Text="名称" />
                <TextBox Text="{Binding UpdateEntity.Name, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
                <TextBlock Margin="0,12,0,0" Text="编号" />
                <TextBox Text="{Binding UpdateEntity.Code, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
            </StackPanel>

            <StackPanel Grid.Row="1" Orientation="Horizontal">
                <Button Width="60"
                        Margin="12,0"
                        Command="{Binding SubmitCommand}"
                        Content="提交" />
                <Button Width="60"
                        Margin="12,0"
                        Command="{Binding CancelCommand}"
                        Content="取消" />
            </StackPanel>
        </Grid>
    </Grid>
</navigation:PageView>
